<!--
 * @Author: 追逐的娃 kangchao_php@163.com
 * @Date: 2024-10-28 10:49:00
 * @LastEditors: 追逐的娃 kangchao_php@163.com
 * @LastEditTime: 2024-10-28 11:36:52
 * @FilePath: \vue-project\src\components\PdfPreview.vue
 * @Description: 
 * 
-->
<template>
  <iframe
    :src="'lib/pdfjs/web/viewer.html?' + src"
    width="100%"
    :web.xmlheight="pdfH"
    style="width: 100%; height: 90%"
  ></iframe>
</template>
<script setup>
import { ref, nextTick, computed, onMounted } from 'vue'
const props = defineProps({
  src: {
    type: String,
    required: true
  }
})

let pdfH = ref(100)
nextTick(() => {
  pdfH.value = document.documentElement.clientHeight - 68
})
onMounted(() => {})
</script>